/**
 * 利用shouldComponentUpdate进行优化
 */
import _ from 'lodash';
import { equal } from '../../utils/util';

export default function shouldComponentUpdate(target) {
	target.prototype.shouldComponentUpdate = function scu(nextProps, nextState) {
		return !equal(this.props, nextProps) || !equal(this.state, nextState);
	};
}
